<p>
  Write a GPU program that counts the number of elements with the integer value p in an 3D array of 32-bit integers. 
  The program should count the number of elements with p in an 3D array.
  You are given an input 3D array <code>input</code> of length <code>N x M x K</code> and integer <code>p</code>.
</p>

<h2>Implementation Requirements</h2>
<ul>
  <li>Use only native features (external libraries are not permitted)</li>
  <li>The <code>solve</code> function signature must remain unchanged</li>
  <li>The final result must be stored in the <code>output</code> variable</li>
</ul>

<h2>Example 1:</h2>
<pre>
Input: input [[[1, 2, 3],
               [4, 5, 1]],
              [[1, 1, 1],
               [2, 2, 2]]]
       N = 2, M = 2, K = 3
       p = 1
Output: output = 5
</pre>

<h2>Example 2:</h2>
<pre>
Input: input [[[5, 10],
               [5, 2],
               [2, 2]]]
       N = 1, M = 3, K = 2 
       p = 1
Output: output = 0
</pre>

<h2>Constraints</h2>
<ul>
  <li>1 &le; <code>N, M, K</code> &le; 1,000</li>
  <li>1 &le; <code>input[i], p</code> &le; 100</li>
</ul>